package com.wbp.cms.core.project.dao;

import java.util.List;
import org.springframework.stereotype.Repository;
import com.wbp.cms.client.project.domain.ProjectProfitDO;
import com.wbp.cms.client.project.query.ProjectProfitQuery;
import com.wbp.cms.core.dao.BaseDao;


/**
 * @Description:
 * @Department:
 * @author andy.lhc
 * @date 2016年3月9日 下午3:07:41
 */
@Repository("projectProfitDAO")
public class ProjectProfitDAO extends BaseDao {

  public Long  insert(ProjectProfitDO  projectProfit){
    super.insert("ProjectProfitMapper.insert", projectProfit) ;
    return  projectProfit.getId() ;
  }
  
  public int  update(ProjectProfitDO  projectProfit){
      return  super.update("ProjectProfitMapper.update", projectProfit) ;
  }
  
  public int  deletetByProjectId(Long  projectId){
    return  super.update("ProjectProfitMapper.delete", projectId) ;
}
  
  
  public ProjectProfitDO  load(Long  id){
    Object obj = super.selectOneObject("ProjectProfitMapper.load", id) ;
    return obj == null ? null : (ProjectProfitDO)obj ;
  }
  
  public List<ProjectProfitDO>  query(ProjectProfitQuery  projectProfitDOQuery){
    return super.selectList("ProjectProfitMapper.query", projectProfitDOQuery) ;
  }
  
  public List<ProjectProfitDO>  queryByProjectId(Long projectId){
    return super.selectList("ProjectProfitMapper.queryByProjectId", projectId) ;
  }
  
  public Integer  queryCount(ProjectProfitQuery  projectProfitDOQuery){
    Object obj = super.selectOneObject("ProjectProfitMapper.queryCount", projectProfitDOQuery) ;
    return obj == null ? null : (Integer)obj ;
  }
  
  
  
}
